package com.example.starfighter;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		/* display the splash screen image */
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.splashscreen);

		// /* Start a new game thread */
		// new Thread() {
		// @Override
		// public void run() {
		//
		// }
		// };
		/* start up the splash screen and main menu in a time delayed thread */
		new Handler().postDelayed(new Thread() {
			@Override
			public void run() {
				Intent mainMenu = new Intent(MainActivity.this,
						SFMainMenu.class);
				MainActivity.this.startActivity(mainMenu);
				MainActivity.this.finish();// method finish() will close this
											// activity
				overridePendingTransition(R.layout.fadein, R.layout.fadeout);
			}
		}, SFEngine.GAME_THREAD_DELAY);

	}

}
